<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心</title>
  
  <link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/hdjs/hdjs.css">
  <script type="text/javascript" src="http://127.0.0.1/my/wasai/Static/Js/jquery-1.7.2.min.js"></script>

  <script src="http://127.0.0.1/my/wasai/Static/public/js/index.js" type="text/javascript" charset="utf-8"></script>
  <link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/public/index.css">
  <link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/public/geren.css">
  	<!--载入uploadify相关文件-->
	<script type="text/javascript" src="http://127.0.0.1/my/wasai/Static/uploadify/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="http://127.0.0.1/my/wasai/Static/uploadify/jquery.uploadify.min.js"></script>
	<link href="http://127.0.0.1/my/wasai/Static/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>
	<script src="http://127.0.0.1/my/wasai/Static/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
   <script type="text/javascript">
   	$(function(){
   	   $('.table_one .li2').click(function(){
   	   	  $(this).css({'height':'29px','background':'white','color':'#000','border-bottom':'none'}).siblings('li').css({'height':'28px','background':'#F5F5F1','color':'#469CA0'});
   	   	  $('.table_two').css({'display':'none'});
   	   	  $('.edit').css({'display':'block'});
   	   })
   	   $('.table_one .li1').click(function(){
   	   	  $(this).css({'height':'29px','background':'white','color':'#000','border-bottom':'none'}).siblings('li').css({'height':'28px','background':'#F5F5F1','color':'#469CA0'});
   	   	  $('.table_two').css({'display':'block'});
   	   	  $('.edit').css({'display':'none'});
   	   })
   	   
   	   $('.zhanghu_u1 li a').click(function(){
   	   	 $('.zhanghu_u1 li a').removeClass();
   	   	 $(this).addClass('green');
   	   	 
   	   })
   	   
   	   $('.spat1').click(function(){
   	   	 $('.table_one').css({'display':'block'});
   	   	 $('.table_two').css({'display':'block'});
   	   	 $('.mydd').css({'display':'none'});
   	   	 $('.mydd1').css({'display':'none'});
   	   })
   	   
   	   $('.spat2').click(function(){
   	   	 $('.table_one').css({'display':'none'});
   	   	 $('.table_two').css({'display':'none'});
   	   	 $('.edit').css({'display':'none'});
   	   	 $('.mydd').css({'display':'block'});
   	   	 $('.mydd1').css({'display':'block'});
   	   })
   	   
   	   
   	   
   	   
   	   $('#paedit').validate({
   	   	   oldpasswd:{
	                rule: {
	                    required: true
	                    
	                },
	                error: {
	                    required: '密码不能为空'
	                    
	                    
	                },
	                success: '验证通过',
	                message: '请输入当前密码'
	        },
	        newpasswd:{
	                rule: {
	                    required: true
	                   
	                },
	                error: {
	                    required: '密码不能为空',
	                    
	                    
	                },
	                success: '验证通过',
	                message: '请输入新密码'
	        },
	        andpasswd: {
	                rule: {
	                    required: true,
	                    confirm: 'newpasswd'
	                },
	                error: {
	                    required: '密码不能为空',
	                    confirm: '两次密码不一致'
	                },
	                success: '验证通过',
	                message: '请确认密码'
	        },
   	   })
   	})
   </script>
</head>

<body>
    <?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--顶部开始-->
    <div class="top">
    	<div class="top1">
    	   <div class="top3">
    	   	<?php if(isset($_SESSION['uid']) || isset($_SESSION['nicname'])){ ?>
    	   	 <ul class="denglu one">
    			<li class="li1" style="width: 8px;">
    				<a href="<?php echo U('Index/Geren/index');?>"><img src="http://127.0.0.1/my/wasai/<?php echo $_SESSION['hearimg'];?>" alt="" style="width: 30px;height: 30px;position: relative;left: -8px;top: 7px;"/></a>
    			</li>
    			<li class="li2"><span><?php echo $_SESSION['nicname'];?></span>&nbsp;&nbsp;&nbsp;<a href="<?php echo U('Index/Login/out');?>">退出</a></li>
    		  </ul>
    	   	 <?php }else{ ?>
    		 <ul class="denglu">
    			<li class="li1"><a href="<?php echo U('Index/Login/denglu');?>">登陆</a></li>
    			<li class="li2"><a href="<?php echo U('Index/Login/index');?>">注册</a></li>
    		 </ul>
    		 <?php } ?>
    		 <ul class="gowu">
    		 	<li class="li2"><a href="<?php echo U('Index/Shop/index');?>" >购物车<span class="zongshuliang">    <?php if($_SESSION[cart][total_rows]){ ?><?php echo $_SESSION[cart][total_rows];?><?php }else{ ?>0<?php } ?></span> 件</a></li>
    			<li class="li1"><img src="http://127.0.0.1/my/wasai/Static/public/images/logo.png" alt="" /></li>
    			
    		 </ul>
    	   </div>
    	</div>
    	<div class="top2">
    		<div class="top4">
    			<a class="wosai" href=""><img src="" alt="" /></a>
	    	   	 <ul class="caidan">
	    			<li class="li1"><a href="<?php echo U('Index/Index/index');?>"></a></li>
	    			<li class="li2"><a href="<?php echo U('Index/Daohang/index');?>">市集</a></li>
	    			<li class="li2"><a href="">新品</a></li>
	    			<li class="li2"><a href="">热买</a></li>
	    			<li class="li2"><a href="">闪购</a></li>
	    			<li class="li3"><a href="">定制</a></li>
	    			<li class="li4"><a href="<?php echo U('Index/Index/index');?>"><img src="http://127.0.0.1/my/wasai/Static/public/images/wosai.png" alt="" /></a></li>
	    		 </ul>
	    		 <ul class="sousuo">
	    			<li class="li1">
	    				<form action="" method="post">
	    					<input class="sou" type="" placeholder="请输入要搜索的关键词" name="" value="" />
	    					<input class="tijiao" type="submit" value=""/>
	    				</form>
	    			</li>
	    			<li class="li2"><a href="">画报</a></li>
	    			<li class="li3"><a href="">动态</a></li>
	    		</ul>
    	   </div>
    	</div>
    </div>
    <!--顶部结束-->

    
    <!--个人中心开始-->
    <div class="geren">
    	<div class="geren_one">
    		<div class="geren_two">
    			<img src="http://127.0.0.1/my/wasai/<?php echo $data['hearimg'];?>"/>
    		</div>
    		<div class="geren_three">
    			<span class="s1"><?php echo $data['nicname'];?></span>
    			<br />
    			<span class="s2"><?php echo date('Y.m.d',$data['time']);?>加入</span>
    			<br />
    			    <?php if($data['jian']){ ?>
    				<span class="s3"><?php echo $data['jian'];?></span>
    		    <?php }else{ ?>
    		    	<span class="s3">这家伙很懒，什么都没写！</span>
    			<?php } ?>
    		</div>
    	</div>
    </div>
    
    <div class="ziliao">
    	<div class="ziliao1">
    		<div class="dao">
    			<div class="zhanghu">
    				<img src="http://127.0.0.1/my/wasai/Static/public/images/0503_tit_01.png"/>
    			</div>
    			<ul class="zhanghu_u1">
    				<li class="spat1"><a href="javascript:;" class="green">个人资料</a></li>
    				<li><a href="<?php echo U('Index/Shop/index');?>">我的购物车</a></li>
    				<li class="spat2"><a href="javascript:;">我的订单</a></li>
    				
    			</ul>
    			
    			<!--<div class="zhanghu and">
    				<img src="http://127.0.0.1/my/wasai/Static/public/images/0503_tit_02.png"/>
    			</div>
    			<ul class="zhanghu_u1 and">
    				<li class="li_jiaoyi"></li>
    				<li class="li1"><a href="">我的购物车</a></li>
    				<li><a href="">我的订单</a></li>
    				<li><a href="">我的最爱</a></li>
    				<li><a href="">我的评价</a></li>
    			</ul>-->
    		</div>
    		<div class="table_one">
    			<ul>
    				<li class="li1"><a href="javascript:;">基本信息</a></li>
    				<li class="li2"><a href="javascript:;">修改密码</a></li>
    			</ul>
    		</div>
    		
    		<div class="table_two">
    			<form action="<?php echo U('Index/Geren/edit');?>" method="post">
    			    <div class="nicname">
    					<span>昵称 : <?php echo $data['nicname'];?></span>
	    			</div>
	    			<div class="zhenname">
	    				<span>真实姓名 :&nbsp;<input type="text" name="zname" id="" value="" /></span>
	    			</div>
	    			<div class="youxiang">
	    				<span>常用邮箱 : <?php echo $data['username'];?></span>
	    			</div>
	    			<div class="jianjie">
	    				<span>个人简介 :&nbsp;</span>
	    			</div>
	    			<div class="jianjie and">
	    				<textarea name="jian" rows="" cols=""></textarea>
	    			</div>
	    			<div class="xingbei">
	    				<span>性别 :&nbsp;
	    					<input type="radio" name="sex" id="" value="保密" />保密
	    					<input type="radio" name="sex" id="" value="男" checked=""/>男
	    					<input type="radio" name="sex" id="" value="女" />女
	    				</span>
	    			</div>
	    			<div class="shengri">
	    				<span>生日 :&nbsp;<input type="text" name="birthday" id="" value="" />例如：0000-00-00</span>
	    			</div>
	    			<div class="touxiang">
	    				
	    				<span>头像 :&nbsp;</span>
	    				
	    			</div>
	    			<div class="touxiang1">
	    				<div class="touxiang2">
	    					<input type="file" name='pic' id='pic'/>
							
				            <script type="text/javascript">
				                $(function() {
				                    $('#pic').uploadify({
				                        'formData'     : {//POST数据
				                            '<?php echo session_name();?>' : '<?php echo session_id();?>',
				                        },
				                        'fileTypeDesc' : '上传文件',//上传描述
				                        'fileTypeExts' : '*.jpg;*.png',
				                        'swf'      : 'http://127.0.0.1/my/wasai/Static/uploadify/uploadify.swf',
				                        'uploader' : '<?php echo U("upload");?>',
				                        'buttonText':'选择图片',
				                        'fileSizeLimit' : '2000KB',
				                        'uploadLimit' : 1000,//上传文件数
				                        'width':65,
				                        'height':25,
				                        'successTimeout':10,//等待服务器响应时间
				                        'removeTimeout' : 0.2,//成功显示时间
				                        'onUploadSuccess' : function(file, data, response) {
				                            data=$.parseJSON(data);
				                            var imageUrl = data.image?data.url:'http://127.0.0.1/my/wasai/Static/image/default.png';
				                            var li="<li path='"+data.path+"' url='"+data.url+"'><img src='"+imageUrl+"' class='hd-w200 hd-h200'/><a href='javascript:;' class='del-img'></a>";
				                            li += '<input type="hidden" name="thumb_list" value="'+data.path+'"/>';
				                           
				                            $("#pic-list").prepend(li);
				                        }
				                    });
				                });
				            </script>
	    				</div>
	    				<div class="touxiang3">
	    					<ul id="pic-list">
	    						
	    					</ul>
	    				</div>
	    			</div>
	    			<div class="baocun">
	    				<input type="submit" value=""/>
	    			</div>
    			    
    			</form>
    			
    		</div>
    		<div class="edit">
    		    <form action="<?php echo U('Index/Geren/paedit');?>" method="post" id="paedit">
    		    	<span class="tishi">提示：为了保证您的帐号安全，请使用8-16位以上数字、字母和特殊符号的组合密码，并定期更换密码。</span>
    		    	<ul class="edit1">
    		    		<li>当前密码：<input type="password" name="oldpasswd" id="" value="" /></li>
    		    		<li>&nbsp;&nbsp;&nbsp;新密码：<input type="password" name="newpasswd" id="" value="" /></li>
    		    		<li>确认密码：<input type="password" name="andpasswd" id="" value="" /></li>
    		    		<li><input type="submit" value="" class="tij"/></li>
    		    	</ul>
    		    </form> 
    		</div>
    		<div class="mydd" style="display: none;">
    			<ul class="mydd_one">
    				<li class="l1">宝贝</li>
    				<li class="l2">宝贝单价</li>
    				<li class="l3">数量</li>
    				<li class="l4">合计</li>
    			</ul>
    		</div>
    		<div class="mydd1" style="display: none;">
    			<?php foreach ($shang as $k=>$v){?>
	    			<div class="bbox">
	    				<div class="simg">
	    					<img src="http://127.0.0.1/my/wasai/<?php echo $v['img'];?>"/>
	    				</div>
	    				<div class="shu">
	    					<a href="javascript:;"><?php echo $v['gname'];?></a>
	    					<br /><br /><br />
	    					<?php foreach ($v['attrSpec'] as $kk=>$vv){?>
		    					<span><?php echo $kk;?>: </span><span><?php echo $vv[0];?></span>
		    				<?php }?>
	    				</div>
	    				<div class="onemach">
	    					<span>￥<?php echo $v['subtotal'];?>.00</span>
	    				</div>
	    				<div class="shuliang1">
	    					<span>￥<?php echo $v['quantity'];?>.00</span>
	    				</div>
	    				<div class="he1">
	    					<span>￥<?php echo $v['total'];?>.00</span>
	    				</div>
	    			</div>
    			<?php }?>
    		</div>
    	</div>
    </div>
    
    <!--个人中心结束-->
    
    <!--底部-->
    <div class="foot">
    	<div class="gaoduan">
    		<span>高端定制上哇噻网</span>
    	</div>
    	<div class="di">
    		<ul>
    			<li><a href="">关于我们</a></li>
    			<li><a href="">联系我们</a></li>
    			<li><a href="">媒体报道</a></li>
    			<li><a href="">创意画报</a></li>
    			<li><a href="">招贤纳士</a></li>
    			<li><a href="">版权保护</a></li>
    			<li><a href="">用户条款</a></li>
    			<li><a href="">隐私声明</a></li>
    			<li><a href="">友情链接</a></li>
    			<li><a href="">网站地图</a></li>
    			<li><a href="">帮助中心</a></li>
    			<li><a href="">手工客</a></li>
    		</ul>
    		<ul class="u1">
    			<li>北京光年创艺信息技术有限公司 WowSai.com Copyright© 2008-2013 [京ICP备10020900][京公网安备11010502026420][京ICP证090011号]</li>
    		</ul>
    		<div class="tu">
    		   <ul>
    		   	    <li><img src="http://127.0.0.1/my/wasai/Static/public/images/2.png" alt="" /></li>
    		   	    <li><img src="http://127.0.0.1/my/wasai/Static/public/images/1.png" alt="" /></li>
    		   	    <li><img src="http://127.0.0.1/my/wasai/Static/public/images/3.png" alt="" /></li>
    		   </ul>
    	    </div>
    	</div>
    	
    </div>
    
    <div class="ding">
    	<a href="javascript:;"></a>
    </div>
    
</body>
</html>

